package train48days;

import java.util.Scanner;

public class 密码强度 {
    public static void main (String[] args) {
        Scanner scanner = new Scanner(System.in);
//        while (scanner.hasNext()) {
            String input = scanner.nextLine();
            GetPwdSecurityLevel(input);
//        }
}

    public static void GetPwdSecurityLevel(String input) {
        char[] inputArray = input.toCharArray();
        int score = 0;
        int letterNum = 0;
        int lowercaseNum = 0;
        int uppercaseNum = 0;
        int digitNum = 0;
        int charNum = 0;

        for (char c : inputArray) {

            if (Character.isLowerCase(c)) {
                lowercaseNum++;
                letterNum++;
            }

            else if (Character.isUpperCase(c)) {
                uppercaseNum++;
                letterNum++;
            }

            else if (Character.isDigit(c)) {
                digitNum++;
            }

            else {
                charNum++;
            }
        }


        int passLength = inputArray.length;
        if (passLength <= 4) {
            score += 5;
        }

        else if (passLength >= 5 && passLength <= 7) {
            score += 10;
        }
        // length >= 8;
        else {
            score += 25;
        }

        if (letterNum == 0) {
            score += 0;
        }
        else if (letterNum > 0) {

            if (lowercaseNum < 1 || uppercaseNum < 1) {
                score += 10;
            }

            else {
                score += 20;
            }
        }

        if (digitNum ==0) {
            score += 0;
        }
        // only one digit
        else if (digitNum == 1) {
            score += 10;
        }

        else if(digitNum>1){
            score += 20;
        }

        if (charNum == 0) {
            score += 0;
        }
        // only one character
        else if (charNum == 1) {
            score += 10;
        }
        // char.num > 1
        else if(charNum>1) {
            score += 25;
        }


        if (letterNum > 0 && digitNum > 0  && charNum ==0) {
            score += 2;
        }

        if (letterNum > 0 && digitNum > 0 && charNum > 0) {
            score += 3;
        }

        if (lowercaseNum >=1 && uppercaseNum >=1  && digitNum >=1  && charNum >=1) {
            score += 5;
        }

        String secLevel = new String();

        if (score >= 90) {
            secLevel = "VERY_SECURE";
        }
        else if (score >= 80) {
            secLevel = "SECURE";
        }
        else if (score >= 70) {
            secLevel = "VERY_STRONG";
        }
        else if (score >= 60) {
            secLevel = "STRONG";
        }
        else if (score >= 50) {
            secLevel = "AVERAGE";
        }
        else if (score >= 25&&score<50) {
            secLevel = "WEAK";
        }
        else if (score >= 0) {
            secLevel = "VERY_WEAK";
        }
        System.out.println(secLevel);
    }
}
